aboutsummaryrefslogtreecommitdiffstats
path: root/src/app/groups/[groupId]
diff options
context:
space:
mode:
authorChris Johnston <christopher_johnston@me.com>2024-01-08 19:26:44 +0000
committerGitHub <noreply@github.com>2024-01-08 14:26:44 -0500
commitbec1dd270a1d3184ea13f0b849f192176354fc00 (patch)
treeebb50246aad6c0562ae892d1729c4eda94ad6ffd /src/app/groups/[groupId]
parent4566900f9cfcc837e56c590c9344d09a4bc50820 (diff)
Add Expense Date (#26)
* add expense date * Improve date formatting * Prettier * Change field description --------- Co-authored-by: Sebastien Castiel <sebastien@castiel.me>
Diffstat (limited to 'src/app/groups/[groupId]')
-rw-r--r--src/app/groups/[groupId]/expenses/expense-list.tsx5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/app/groups/[groupId]/expenses/expense-list.tsx b/src/app/groups/[groupId]/expenses/expense-list.tsx
index 798a5f8..7ee8329 100644
--- a/src/app/groups/[groupId]/expenses/expense-list.tsx
+++ b/src/app/groups/[groupId]/expenses/expense-list.tsx
@@ -41,7 +41,10 @@ export function ExpenseList({
{expense.title}
</div>
<div className="text-xs text-muted-foreground">
- Paid by <strong>{getParticipant(expense.paidById)?.name}</strong>{' '}
+ Paid by <strong>{getParticipant(expense.paidById)?.name}</strong> on{' '}
+ {expense.expenseDate.toLocaleDateString('en-US', {
+ dateStyle: 'medium',
+ })}{' '}
for{' '}
{expense.paidFor.map((paidFor, index) => (
<Fragment key={index}>